package day6;
/**
 * 方法重载
 * @author LLLLogan
 *
 */
public class MyMath {
	public int add(int a,int b) {
		return a + b;
	}
	public float add(float a,float b) {
		return a + b;
	}
	public double add(double a,double b) {
		return a + b;
	}
	public static void main(String[] args) {
		MyMath m = new MyMath();
		System.out.println("3 + 5 =" + m.add(3, 5));
		System.out.println("3.14159 + 5.0 =" + m.add(3.14159f, 5.0f));
		System.out.println("3.14159 + 5.0 =" + m.add(3.14159, 5.0));
	}
}
